cmake_minimum_required(VERSION 3.22)

project(dev)
add_library(dev INTERFACE)

# Enable CMake support for ASM and C languages
enable_language(C ASM)

add_subdirectory(device)
add_subdirectory(dev_output)
add_subdirectory(dev_multi_button)
add_subdirectory(dev_uart)
add_subdirectory(dev_input)
add_subdirectory(dev_st7789)

target_link_libraries(${CMAKE_PROJECT_NAME}
    device
    dev_output
    dev_uart
    dev_input
    dev_multi_button
    dev_st7789
)

target_include_directories(dev INTERFACE

)

target_sources(dev INTERFACE
)

# Validate that STM32CubeMX code is compatible with C standard
if(CMAKE_C_STANDARD LESS 11)
    message(ERROR "Generated code requires C11 or higher")
endif()


